package cn.com.miao.lynx.service.system.service;

import cn.com.miao.lynx.common.base.service.BaseService;
import cn.com.miao.lynx.service.system.entity.SysPermission;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;

/**
 * SysPermissionService
 *
 * @title: SysPermissionService
 * @description:
 * @author: dengmiao
 * @create: 2020-01-06 15:09
 **/
public interface SysPermissionService extends BaseService<SysPermission, Long> {

    /**
     * 查询用户拥有的权限
     * @param userId
     * @return
     */
    @Cacheable(value = "sysPermission::findPermissionList", key = "#userId", sync = true)
    List<SysPermission> findPermissionListByUserId(Long userId);
}
